package ebj.common.reflection;

import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Properties;

import ebj.common.utils.Utils;

public class Tester {
	
	private static Properties properties = new Properties();

	public static void main(String[] args) {
		URL baseUrl = Tester.class.getResource("/");
		properties = Utils.getProperties();
		String clazzName = properties.getProperty("Person");
		
		System.out.println(baseUrl);
		System.out.println(baseUrl.getPath());
		System.out.println(clazzName);				
		System.out.println(Utils.getProperty("Person"));
		System.out.println(Utils.getProperty("config", "Person"));
		
		String str_city_name = "上海";
		String str_city_name_url_encode = URLEncoder.encode(str_city_name);
		System.out.println(str_city_name_url_encode);
		try {
			System.out.println(URLEncoder.encode(str_city_name, "UTF-8"));
			System.out.println(URLEncoder.encode(str_city_name, "ISO-8859-1"));
			System.out.println(URLEncoder.encode(str_city_name, "GBK					"));
		} catch (UnsupportedEncodingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
